divide and find the remainder